<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page session="false" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>呱呱视频社区</title>
<link rel="stylesheet" type="text/css" href="/images/style.css" />

		
</head>

<body>
  <div class="w793">
     <div class="w386">
       <h2><c:if test="${roomInfo[0].roomMaster==1 }"><a href="#" onclick = "show('fd');activeTag(-1);return false;">发布活动</a> </c:if><img src="images/icon01.jpg" width="78" height="16" alt="热门活动" /></h2>
       <div class="activeCont">
          <c:if test="${roomInfo[0].roomMaster==1 and empty activeInfo }"><img class="ts_1" src="images/ts_1.jpg" /></c:if>
          <c:if test="${roomInfo[0].roomMaster==0 and empty activeInfo }"><img class="ts_1" src="images/ts_4.jpg" /></c:if>
          <c:if test="${!empty activeInfo }"><img src="images/line01.jpg" width="3" height="220" alt="" class="fl" /></c:if>
          <c:forEach items="${activeInfo}" var="his" varStatus="vs">
          <div id="actice${his.id}">
          <div  class="w346"> <p class="activeCont01 <c:if test="${his.joinerStat==0 and his.period!=2}">col4d5</c:if><c:if test="${his.period==2 }">col4d5</c:if>"><img src="images/dian.jpg" width="3" height="3" alt="" /><span id="preASubject${his.id}">${his.active_subject}</span><br />
          <font class="<c:if test="${his.period==0 }">ft02</c:if><c:if test="${his.period==2 }">ft02</c:if>">
               <c:if test="${his.period==1 }">正在进行中...</c:if><c:if test="${his.period==0 }">${his.start_time_str}</c:if><c:if test="${his.period==2 }">${his.start_time_str}</c:if></font><c:if test="${roomInfo[0].roomMaster==1 and his.room_id==roomInfo[0].room_id}"><a href="#" onclick="subdelActive(${his.id},${his.photoid});">删除</a><a href="#" onclick = "show('fd');editActive(${his.id});">编辑</a></c:if></p>
                <input type="hidden" id="ac_photo_name_${his.id}" value="${his.photo_name}">
                <input type="hidden" id="ac_start_time_${his.id}" value="${his.start_time}">
                <input type="hidden" id="ac_end_time_${his.id}" value="${his.end_time}">
                <input type="hidden" id="ac_photoid_${his.id}" value="${his.photoid}">
                <input type="hidden" id="ac_centerflag_${his.id}" value="${his.center_flag}">
          <a class="bmBut_1" id="preactiveA${his.id}"  href="<c:if test="${his.joinerStat==1 }">javascript:subJoiner(${his.id});</c:if><c:if test="${his.joinerStat==0 }">#</c:if>"><p id="joinerStat${his.id}" class="<c:if test="${his.joinerStat==0 and his.period!=2}">activeCont0002</c:if><c:if test="${his.joinerStat==1 and his.period!=2 }">activeCont02</c:if><c:if test="${his.period==2 }">activeCont003</c:if>"><span id="joinAmount${his.id}">${his.join_amount}</span>人</p></a>
          </div>
          <div id="preAContent${his.id}" class="activeCont03">${his.active_content}</div>
           <c:if test="${his.imgURL ne '' }"><div class="activeCont04"><img id="preactiveAvatar${his.id}" src="${his.imgURL}" width="216" height="111"/><c:if test="${his.room_id!=roomInfo[0].room_id}"><em class="fromfj">${his.room_id}</em></c:if></div></c:if>
          </div>
          </c:forEach>        
       </div>
     </div>

     <div class="w381">
     <div class="newlt">
       <div class="w350">
         <c:if test="${roomInfo[0].roomMaster==1 }"><a href="#" onclick = "show('fd3');return false;">编辑</a></c:if>
        <dl class="fl">
         <dt><img id="preroomavatar" src="${roomInfo[0].imgURL}" width="40" height="40" alt="" /></dt>
         <dd><strong >${roomInfo[0].name}</strong><p>ID:<span class="col4d5">${roomInfo[0].room_id}
         <input type="hidden" id="room_id" value="${roomInfo[0].room_id}">
         <input type="hidden" id="create_time" value="${roomInfo[0].create_time}">
         <input type="hidden" id="userid" value="${userid}"></span></p></dd>
       </dl>
       </div> 
       <p id="preroomdes" class="col4d5 newltcont"><c:if test="${empty roomInfo[0].description }"><img src="images/ts_2.jpg" /></c:if>${roomInfo[0].description}</p>
     </div>
     
     <div class="star">
       <h3><span class="fr"><img onmousedown="ISL_GoDown()" onmouseup="ISL_StopDown()" onmouseout="ISL_StopDown()" src="images/icon06.jpg" width="8" height="4" alt=""  class="fl"/><img onmousedown="ISL_GoUp()" onmouseup="ISL_StopUp()" onmouseout="ISL_StopUp()" src="images/icon07.jpg" width="8" height="4" alt=""  class="fl"/></span>
       <strong class="col4d5">${starInfo[1]}</strong><c:if test="${roomInfo[0].roomMaster==1 }"><a onclick = "show('fd2');return false;" href="#">添加&lt;&lt;</a></c:if></h3>
       <div id="ISL_Cont">
           <div id="List1">
           <c:if test="${roomInfo[0].roomMaster==1 and empty starInfo[0] }"><img src="images/ts_3.jpg" /></c:if>
           <c:if test="${roomInfo[0].roomMaster==0 and empty starInfo[0] }"><img src="images/ts_5.jpg" /></c:if>
           <c:forEach items="${starInfo[0]}" var="his" varStatus="vs">
               <dl>
                 <dt><a href="${his.url}" target="_blank"><img src="${his.imgURL}" width="40" height="40" alt="" title="${his.introduce}"/></a></dt>
                 <dd><a href="${his.url}" target="_blank">${his.nickname}</a><br />ID:<span class="col4d5">${his.user_id}</span></dd>
               </dl>
            </c:forEach>                
           </div>
           <div id="List2"></div>
       </div>
     </div>
     </div>  
     <div class="tc_1Box" id="fd" style="display:none;filter:alpha(opacity=100);opacity:1;">
     <div class="title_1"><h3>发布活动</h3><a href="#" onclick = "activeReIndex();">返回首页>></a></div>
     <!--  <ul class="left_1">
        <li><p class="td_1">输入活动标题</p><input id="active_subject" class="ipt_1" name="" type="text" onkeyup="checkMax(this,30);" onafterpaste="checkMax(this,30);" /></li>
        <li><p class="td_1">开始时间</p><input id="startime_str" class="ipt_2" name="" type="text"  /></li>
        <li><p class="td_1">活动时长</p><select id="active_time" onchange="computDate();"><option value="0">活动时长</option><option value="30">30分钟</option><option value="60">1小时</option>
                                              <option value="90">1.5小时</option><option value="120">2小时</option><option value="180">3小时</option><option value="240">4小时</option>
                                              <option value="300">5小时</option><option value="360">6小时</option></select></li>
        <li><p class="td_1">结束时间</p><span id="endtime"></span></li>
        <li><p class="td_1">活动简介</p><textarea id="active_content" class="tt_1" name="" cols="" rows="" onkeyup="checkMax(this,100);" onafterpaste="checkMax(this,100);"></textarea></li>
        <li><p class="td_1">&nbsp;</p><p class="td_2">请控制活动简介字符在50字范围内！</p></li>
     </ul>
     <div class="right_1">
         <p id="ywc" class="ywc"><span>已完成</span><a id="ywc_pho_name">slefjlsjfiej.jpg</a><a id="ywc_del_h" href="#" class="x"></a></p>
        <a href="#" id="uploadactive" class="tjhb">添加海报</a>
        <p class="yl_1">预览：</p>
        <div class="lvBox">
        	<img id="active_avatar" src="images/bj01.jpg" />
        </div>
        <p class="wtPx_1">上传图片500k以内，最佳尺寸511*262，格式.jpg、.png、.gif</p>
        <input type="checkbox" <c:if test="${roomInfo[0].onlineWeek<20 }">disabled</c:if>/><span title="需达到周平均在线20人">发布到活动中心</span>
        <div class="but_box">
            <a class="but_2" href="#" onclick = "activeReIndex();">取消</a>
            <a class="but_1" id="activeSub"  href="javascript:subActive();" >确定</a>
        </div>
     </div-->
     <div class="cont">
  <div class="contL">
    <input id="active_subject" type="text" value="活动标题最多输入15个汉字" 
    onfocus="if(value=='活动标题最多输入15个汉字'){this.style.color='#000000'; value=''}" onblur="if(value==''){this.style.color='#848484'; value='活动标题最多输入15个汉字'}"  class="tittxt" onkeyup="checkMax(this,30);" onafterpaste="checkMax(this,30);"/>
    <p><input id="startime_str" type="text" value="开始日期" 
    onfocus="if(value=='开始日期'){this.style.color='#000000'; value=''}" onblur="if(value==''){this.style.color='#848484'; value='开始日期'}" class="datetxt01"/><img src="images/date.jpg" alt="" class="icon" onclick="$('#startime_str').click();" />
      <span class="datetxt02"><input id="startime_hour" type="text" value="00"  
      onfocus="if(value=='00'){this.style.color='#000000'; value=''}" onblur="if(value==''){this.style.color='#848484'; value='00'}" onkeyup="this.value=this.value.replace(/\D/g,'');computDate();" onafterpaste="this.value=this.value.replace(/\D/g,'')" /></span>
       <span class="datetxt03"><input id="startime_min" type="text" value="00"  
       onfocus="if(value=='00'){this.style.color='#000000'; value=''}" onblur="if(value==''){this.style.color='#848484'; value='00'}" onkeyup="this.value=this.value.replace(/\D/g,'');computDate();" onafterpaste="this.value=this.value.replace(/\D/g,'')" /></span></p>
     <p><select class="datesel" id="active_time" onchange="computDate();">
     <option value="0">活动时长</option><option value="30">30分钟</option><option value="60">1小时</option>
                                              <option value="90">1.5小时</option><option value="120">2小时</option><option value="180">3小时</option><option value="240">4小时</option>
                                              <option value="300">5小时</option><option value="360">6小时</option></select></p>
     <p class="timeCont">结束时间：<span id="endtime"></span></p>
     <p>
       <textarea class="introCont" id="active_content" 
       onfocus="if(value=='活动介绍最多50个汉字'){this.style.color='#000000'; value=''}" onblur="if(value==''){this.style.color='#848484'; value='活动介绍最多50个汉字'}" onkeyup="checkMax(this,100);" onafterpaste="checkMax(this,100);">活动介绍最多50个汉字</textarea>
     </p>
  </div>
  <p class="line"></p>
  <div class="contR ">
    <div class="hb"><a href="#" class="fl" title="TIPS：支持JPG,PNG;大小1M以内;尺寸介于511*262和1024*1024之间"><span id="uploadactive" class="tjhb">添加海报</span></a><p id="ywc" ><span class="hbml fl">&nbsp;</span><span  class="ce10 hbml fl">已完成</span>
      <a id="ywc_pho_name" class="hbml fl"></a><a href="#" class="close" id="ywc_del_h" title="删除"></a>
    </p></div>
    <div class="Tip"><img id="active_avatar" src="images/Head.jpg" alt="" /></div>
    <p class="contRmt gltl"><input id="center_flag" type="checkbox" class="fl" onclick="centerChange();"  <c:if test="${roomInfo[0].onlineWeek<20 }">disabled</c:if>/><label class="fl" title="需达到周平均在线20人">发布到活动中心</label><a href="#">管理条例</a></p>
    <p class="contRmt"><select id="tag_category" class="sel" onchange="activeTag(this.value);" disabled><option value="0">请选择分类</option></select>
       <select id="tag_id" class="sel" disabled><option value="0">请选择</option></select></p>
   <div class="contRmt">
            <a  class="qdbtn" id="activeSub"  href="javascript:subActive();" >确定</a>
            <a  class="qxbtn" href="#" onclick = "activeReIndex();">取消</a>
            
        </div>
  </div>
</div>
    </div>
    <div class="tc_2Box" id="fd2" style="display:none;filter:alpha(opacity=100);opacity:1;">
     <div class="title_1"><h4>已添加的明星</h4><a onclick = "delImg($('#avatar').attr('src'));window.location.reload();" href="#">返回首页>></a>
     <div class="tjtj">添加推荐
     <input value="${starInfo[1]}" name="star.subject" id="subject" type="text" onkeyup="checkMax(this,10);" onafterpaste="checkMax(this,10);"/>
     </div></div>
     <div class="left_2">
         <ul id="list">
          <c:forEach items="${starInfo[0]}" var="his" varStatus="vs">
            <li id="star${his.id}" onmouseout="this.className=''" onmouseover="this.className='index_channelGoodsOver'">
                <div class="lfImg"><img id="starImg${his.id}" src="${his.imgURL}" /></div>
                <div class="rtTxt">
                    <p>${his.nickname}</p>
                    <p>ID:<span>${his.user_id}</span></p>
                </div>
                <a href="#" onclick="subDelStar(${his.id},${his.photoid});" class="x2"></a>
            </li>
          </c:forEach>  
         </ul>
         <div class="updown"><span id="thePrePage"><a href="javascript:prePage()">上一页</a></span> <span>|</span> <span id="theNextPage"><a href="javascript:nextPage()">下一页</a></span></div>
     </div>
     <div class="right_2">
     	<ul>
        	<li><p class="td_1">昵称</p><input class="ipt_3" id="nickname" name="star.nickname" type="text" onkeyup="checkMax(this,10);" onafterpaste="checkMax(this,10);"/></li>
            <li><p class="td_1">ID</p><input class="ipt_3" id="user_id" name="star.user_id" type="text" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" maxlength=11/></li>
            <li><p class="td_1">超链接</p><input class="ipt_3" id="url" name="star.url" type="text" value="http://"/></li>
            <li><p class="td_1">个人简介</p><textarea name="star.introduce" id="introduce" cols="" rows="" onkeyup="checkMax(this,50);" onafterpaste="checkMax(this,50);"></textarea></li>
            <li class="dwImg">
            	<div id="uploadstar"></div><img id="avatar" src="images/img/but_3.jpg" />
            	<p>图片500k以内，最佳尺寸36*36，<br />格式.jpg、.png、.gif</p>
            </li>
        </ul>
        <div class="but_box rmg">
            <a class="but_2" onclick = "delImg($('#avatar').attr('src'));window.location.reload();" href="#">取消</a>
        	<a class="but_1" onclick ="subStar();" href="#">确定</a>
        </div>
     </div>
  </div>
  <div class="tc_3Box" id="fd3" style="display:none;filter:alpha(opacity=100);opacity:1;">
     <div class="title_1"><h5>>>房间信息</h5><a href="#" onclick = "closeed('fd3');return false;">返回首页>></a></div>
     <ul class="fjBox">
     	<li class="fjList1">
     		<p class="leftTxt2">头像<br /><a id="uploadroom" href="#">上传</a></p>
     		<img id="roomavatar" class="leftImg" src="${roomInfo[0].imgURL}" />
     		<div class="imgPs1">
     			上传图片500k以内，最佳尺寸36*36，<br />格式.jpg、.png、.gif
     		</div>
     	</li>
        <li><p class="leftTxt">房间简介</p><textarea id="description" name="" cols="" rows="" onkeyup="checkMax(this,100);" onafterpaste="checkMax(this,100);">${roomInfo[0].description}</textarea></li>
        <li><p class="leftTxt">&nbsp;</p><p class="td_2">简介在50字范围内！</p></li>
        <li><p class="leftTxt">&nbsp;</p><a href="#" onclick = "subRoomInfo();" class="but_4">保存</a><a href="#" onclick = "closeed('fd3');return false;" class="but_3">取消</a></li>
     </ul>
  </div>
  <div class="tcMin_1" id="uploadprocess">
  	<h3>上传进度<a class="x" href="#" onclick="$('#uploadprocess').hide();"></a></h3>
    <div class="schedule">
    	<div class="lfC" id="uploadBar" style="width:70px;"></div><div class="rtC" style="width:200px"><p>上传中...</p></div><a class="but_2" href="#" onclick="$('#uploadprocess').hide();">取消</a>
    </div>
  </div>
  <div class="tcMin_1" >
  	<h3>取消上传<a class="x" href="#"></a></h3>
    <div class="schedule">
    	<p>照片正在上传中，确定取消上传吗？</p>
    </div>
    <div class="scheduleBut"><a class="but_5" href="#">确定</a><a class="but_5" href="#">取消</a></div>
  </div>
  <div class="tcMin_1" id="cropImg" >
  	<h3>请裁剪图片为标准尺寸<a class="x" href="javascript: jcrop_api.destroy();$('#cropImg').hide();delImg($('#target').attr('src'));"></a></h3>
    <div class="leftImg2">
    	<div class="imgBox">
    		<img  src="" id="target" />
    		<input type="hidden" name="x1"  id="x1" />
				<input type="hidden" name="y1"  id="y1" />
				<input type="hidden" name="x2"  id="x2" />
				<input type="hidden" name="y2"  id="y2" />
        </div>
    	<p>标准尺寸：36*36</p>
    </div>  
    <div class="rightTxt2">
    	<div class="imgBox1">
            <p>预览:</p>
            
            <div class="rightImg" id="hideDivForPre" style="width:36px;height:36px;overflow:hidden;">
                <img src="" id="preview" />
            </div>
    	</div>
    	<p class="cc_1">36*36</p>
        <p class="ps_1">你上传的头像会自动生成标准尺寸大小，请注意标准尺寸的头像是否清晰！</p>
        <div class="scheduleBut2"><a class="but_5" id="subCrop" href="#">确定</a><a class="but_2" href="javascript: jcrop_api.destroy();$('#cropImg').hide();delImg($('#target').attr('src'));">取消</a></div>
    </div>  
  </div>
       <div id="cropActiveImg" class="tcMin_2">
  	<h3>请裁剪图片为标准尺寸<a class="x" href="javascript:jcrop_api.destroy();$('#cropActiveImg').hide();delImg($('#targetActive').attr('src'));"></a></h3>
    <div class="leftImg3">
    	<div class="imgBox">
    		<img  src="" id="targetActive" />
        </div>
    	<p>标准尺寸：511*262</p>
    </div>  
    <div class="rightTxt3">
    	
        <p class="ps_1">你上传的图片会自动生成标准尺寸大小，请注意标准尺寸的海报是否清晰！</p>
        <div class="scheduleBut2"><a class="but_5" href="javascript:subCropActive();">确定</a><a class="but_2" href="javascript:jcrop_api.destroy();$('#cropActiveImg').hide();delImg($('#targetActive').attr('src'));">取消</a></div>
    </div>  
  </div>
  </div>
  <script type="text/javascript">
var Speed = 1; 
var Space = 1; 
var PageHeight = 50;
var fill = 0; 
var MoveLock = false;
var MoveTimeObj;
var Comp = 0;
var AutoPlayObj = null;
GetObj('ISL_Cont').scrollTop = fill;
GetObj("ISL_Cont").onmouseover = function(){clearInterval(AutoPlayObj);}
GetObj("ISL_Cont").onmouseout = function(){AutoPlay();}
AutoPlay();
function GetObj(objName){if(document.getElementById){return eval('document.getElementById("'+objName+'")')}else{return eval('document.all.'+objName)}}
function AutoPlay(){ 
 clearInterval(AutoPlayObj);
 AutoPlayObj = setInterval('ISL_GoDown1();ISL_StopDown();',5000); 
}
function ISL_GoUp(){ 
 if(MoveLock) return;
 clearInterval(AutoPlayObj);
 MoveLock = true;
 MoveTimeObj = setInterval('ISL_ScrUp();',Speed);
}
function ISL_StopUp(){ 
 clearInterval(MoveTimeObj);
 if(GetObj('ISL_Cont').scrollTop % PageHeight - fill != 0){
  Comp = fill - (GetObj('ISL_Cont').scrollTop % PageHeight);
  CompScr();
 }else{
  MoveLock = false;
 }
 AutoPlay();
}
function ISL_ScrUp(){ 
 if(GetObj('ISL_Cont').scrollTop <= 0){GetObj('ISL_Cont').scrollTop = GetObj('ISL_Cont').scrollTop + GetObj('List1').offsetHeight}
 GetObj('ISL_Cont').scrollTop -= Space ;
}
function ISL_GoDown(){ 
 clearInterval(MoveTimeObj);
 if(MoveLock) return;
 clearInterval(AutoPlayObj);
 MoveLock = true;
 ISL_ScrDown();
 MoveTimeObj = setInterval('ISL_ScrDown()',Speed);
}
function ISL_GoDown1(){ 
 clearInterval(MoveTimeObj);
 if(MoveLock) return;
 clearInterval(AutoPlayObj);
 MoveLock = true;
 ISL_ScrDown1();
 MoveTimeObj = setInterval('ISL_ScrDown1()',Speed);
}
function ISL_StopDown(){ 
 clearInterval(MoveTimeObj);
 if(GetObj('ISL_Cont').scrollTop % PageHeight - fill != 0 ){
  Comp = PageHeight - GetObj('ISL_Cont').scrollTop % PageHeight + fill;
  CompScr();
 }else{
  MoveLock = false;
 }
 AutoPlay();
}
function ISL_ScrDown(){ 
 if(GetObj('ISL_Cont').scrollTop >= (GetObj('ISL_Cont').scrollHeight-2*PageHeight)){}
 GetObj('ISL_Cont').scrollTop += Space ;
}
function ISL_ScrDown1(){ 
 if(GetObj('ISL_Cont').scrollTop >= (GetObj('ISL_Cont').scrollHeight-2*PageHeight)){GetObj('ISL_Cont').scrollTop=0;clearInterval(MoveTimeObj);return;}
 GetObj('ISL_Cont').scrollTop += Space ;
}
function CompScr(){
 var num;
 if(Comp == 0){MoveLock = false;return;}
 if(Comp < 0){ 
  if(Comp < -Space){
   Comp += Space;
   num = Space;
  }else{
   num = -Comp;
   Comp = 0;
  }
  GetObj('ISL_Cont').scrollTop -= num;
  setTimeout('CompScr()',Speed);
 }else{ 
  if(Comp > Space){
   Comp -= Space;
   num = Space;
  }else{
   num = Comp;
   Comp = 0;
  }
  GetObj('ISL_Cont').scrollTop += num;
  setTimeout('CompScr()',Speed);
 }
}
</script>
<link rel="stylesheet" type="text/css" href="/css/jquery.Jcrop.css" />
<link rel="stylesheet" type="text/css" href="/css/jscal2.css" />
<link rel="stylesheet" type="text/css" href="/css/border-radius.css" />
<link rel="stylesheet" type="text/css" href="/css/gold/gold.css" />
<link rel="stylesheet" type="text/css" href="/css/reduce-spacing.css" />

<script type="text/javascript" src="/js/jquery-1.7.1.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/jquery.Jcrop.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/jcrop_1_0.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/jscal2.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/page.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/cn.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/swfobject.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/index.js" charset="utf-8"></script>
</body>
</html>
